<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
var addBinary = function(a, b) {
    a = '0b' + a
    b = '0b' + b
    a = Number(a)
    b = Number(b)
    return (a+b).toString(2)
};
var a = "11"
var b = "1"
console.log(addBinary(a, b))
    </script>
</body>
</html>